%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Finite box potential.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;

bet=1/20;
E_V=[-1:.001:0];
EaV=abs(E_V);
Ta =tan(1/bet*sqrt(1-EaV));
Ci =2*sqrt(EaV.*(1-EaV))./(1-2*EaV);

n  =[1:10];
EnV=pi^2*bet^2*n.^2-1;
EbV=abs(EnV);
Cn =2*sqrt(EbV.*(1-EbV))./(1-2*EbV);

dum=abs(Ta-Ci)<9e-2;

figure(1);			clf;
subplot(221),plot(Ta,E_V,'r',Ci,E_V,'g',Cn,EnV,'+k',Ta(dum),E_V(dum),'oc','LineWidth',1.4,'MarkerSize',10)%
set(gca,'xLim',[-10 10],'yLim',[-1 0],'Fontsize',16,'LineWidth',1.4)
xlabel(['$\displaystyle \tan{k_2L}~,~\frac{2\kappa_1k_2}{-\kappa_1^2+\kappa_2^2}$'],'interpreter','latex','Color','k','FontSize',16)
ylabel('\fontsize{16}{\itE , V_0 , E_n}')
